<template>
    <div>
      <a-button @click="showConfirm">
        确认
      </a-button>
      <a-button type="dashed" @click="showDeleteConfirm">
        删除
      </a-button>
    </div>
  </template>
  <script>
  export default {
    methods: {
      showConfirm() {
        this.$confirm({
          title: '你想删除这个项目吗?',
          content: h => <div style="color:red;">描述信息</div>,
          okText: '确定',
          cancelText: '取消',
          onOk() {
            console.log('OK');
          },
          onCancel() {
            console.log('Cancel');
          },
          class: 'test',
        });
      },
  
      showDeleteConfirm() {
        this.$confirm({
          title: '你确定删除这个任务吗?',
          content: '描述信息',
          okText: '确定',
          cancelText: '取消',
          okType: 'danger',
          onOk() {
            console.log('OK');
          },
          onCancel() {
            console.log('Cancel');
          },
        });
      },
    },
  };
  </script>
  